/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package seso;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "FEOoHead", catalog = "M3ERP", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "FEOoHead.findAll", query = "SELECT f FROM FEOoHead f"),
    @NamedQuery(name = "FEOoHead.findByTransactionNo", query = "SELECT f FROM FEOoHead f WHERE f.transactionNo = :transactionNo"),
    @NamedQuery(name = "FEOoHead.findByTempCo", query = "SELECT f FROM FEOoHead f WHERE f.tempCo = :tempCo"),
    @NamedQuery(name = "FEOoHead.findByCoNo", query = "SELECT f FROM FEOoHead f WHERE f.coNo = :coNo"),
    @NamedQuery(name = "FEOoHead.findBySeason", query = "SELECT f FROM FEOoHead f WHERE f.season = :season"),
    @NamedQuery(name = "FEOoHead.findByBrand", query = "SELECT f FROM FEOoHead f WHERE f.brand = :brand"),
    @NamedQuery(name = "FEOoHead.findByFacility", query = "SELECT f FROM FEOoHead f WHERE f.facility = :facility"),
    @NamedQuery(name = "FEOoHead.findByCustomerCode", query = "SELECT f FROM FEOoHead f WHERE f.customerCode = :customerCode"),
    @NamedQuery(name = "FEOoHead.findByCustomer", query = "SELECT f FROM FEOoHead f WHERE f.customer = :customer"),
    @NamedQuery(name = "FEOoHead.findByCoType", query = "SELECT f FROM FEOoHead f WHERE f.coType = :coType"),
    @NamedQuery(name = "FEOoHead.findByStatus", query = "SELECT f FROM FEOoHead f WHERE f.status = :status")})
public class FEOoHead implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "TransactionNo")
    private String transactionNo;
    @Column(name = "TempCo")
    private String tempCo;
    @Column(name = "CoNo")
    private String coNo;
    @Column(name = "Season")
    private String season;
    @Column(name = "Brand")
    private String brand;
    @Column(name = "Facility")
    private String facility;
    @Column(name = "CustomerCode")
    private String customerCode;
    @Column(name = "Customer")
    private String customer;
    @Column(name = "CoType")
    private String coType;
    @Column(name = "Status")
    private String status;

    public FEOoHead() {
    }

    public FEOoHead(String transactionNo) {
        this.transactionNo = transactionNo;
    }

    public String getTransactionNo() {
        return transactionNo;
    }

    public void setTransactionNo(String transactionNo) {
        String oldTransactionNo = this.transactionNo;
        this.transactionNo = transactionNo;
        changeSupport.firePropertyChange("transactionNo", oldTransactionNo, transactionNo);
    }

    public String getTempCo() {
        return tempCo;
    }

    public void setTempCo(String tempCo) {
        String oldTempCo = this.tempCo;
        this.tempCo = tempCo;
        changeSupport.firePropertyChange("tempCo", oldTempCo, tempCo);
    }

    public String getCoNo() {
        return coNo;
    }

    public void setCoNo(String coNo) {
        String oldCoNo = this.coNo;
        this.coNo = coNo;
        changeSupport.firePropertyChange("coNo", oldCoNo, coNo);
    }

    public String getSeason() {
        return season;
    }

    public void setSeason(String season) {
        String oldSeason = this.season;
        this.season = season;
        changeSupport.firePropertyChange("season", oldSeason, season);
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        String oldBrand = this.brand;
        this.brand = brand;
        changeSupport.firePropertyChange("brand", oldBrand, brand);
    }

    public String getFacility() {
        return facility;
    }

    public void setFacility(String facility) {
        String oldFacility = this.facility;
        this.facility = facility;
        changeSupport.firePropertyChange("facility", oldFacility, facility);
    }

    public String getCustomerCode() {
        return customerCode;
    }

    public void setCustomerCode(String customerCode) {
        String oldCustomerCode = this.customerCode;
        this.customerCode = customerCode;
        changeSupport.firePropertyChange("customerCode", oldCustomerCode, customerCode);
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        String oldCustomer = this.customer;
        this.customer = customer;
        changeSupport.firePropertyChange("customer", oldCustomer, customer);
    }

    public String getCoType() {
        return coType;
    }

    public void setCoType(String coType) {
        String oldCoType = this.coType;
        this.coType = coType;
        changeSupport.firePropertyChange("coType", oldCoType, coType);
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        String oldStatus = this.status;
        this.status = status;
        changeSupport.firePropertyChange("status", oldStatus, status);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (transactionNo != null ? transactionNo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FEOoHead)) {
            return false;
        }
        FEOoHead other = (FEOoHead) object;
        if ((this.transactionNo == null && other.transactionNo != null) || (this.transactionNo != null && !this.transactionNo.equals(other.transactionNo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "seso.FEOoHead[ transactionNo=" + transactionNo + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
